import React from "react";
import {useParams} from 'react-router';

function Demo2() {
  const params = useParams();
  console.log(params); 
  return (
    <div>
      <p>{params.id}</p>
    </div>
  );
}

export default Demo2;
